home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / ticker2.zip / scripts / time.cmd < prev    next >
OS/2 REXX Batch file  |  1996-06-13  |  1KB  |  42 lines

  1. /* time ticker script */
  2.  
  3. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. call SysLoadFuncs
  5.  
  6.                /* note: this script is written for Germany */
  7.                /* unfortunatly it is not possible, to ask OS/2 */
  8.                /* about your local timezone */
  9. local = 1      /* German (summer)time = GMT +1 */
  10. hawaii = -10   /* Hawaiian (summer)time = GMT -10 */
  11.  
  12. language = SysIni('ticker.ini', 'TICKER', 'LANGUAGE')
  13.  
  14. if ((language = 'FEHLER:') | (language = 'ERROR:')) then 
  15.   language = 'US ENGLISH'
  16.  
  17. minutes = time('M')
  18. hours = minutes % 60
  19. minutes = minutes // 60
  20.  
  21. hhours = hours - local + hawaii   /* hours in hawaii */
  22.  
  23. if (hhours < 0) then
  24.     hhours = hhours + 24
  25. if (hhours > 24) then
  26.     hhours = hhours - 24
  27.  
  28. if (hours < 10) then hours = '0'hours
  29. if (hhours < 10) then hhours = '0'hhours
  30. if (minutes < 10) then minutes = '0'minutes
  31.  
  32. timestr = hours':'minutes'   Hawaii: 'hhours':'minutes
  33.  
  34. if (language = 'GERMAN') then
  35.   str = ' Lokal: 'timestr' (Annahme: lokale Zeit ist MDT) '
  36. else
  37.   str = ' Local: 'timestr' (Assumed: local time is MDT) '
  38.  
  39. call addTicker str, timetck, 60, green
  40.  
  41. exit
  42.